home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / DRAGLIST.PAK / README.TXT < prev   
Text File  |  1997-05-06  |  2KB  |  43 lines

  1. Copyright Borland International
  2. ObjectWindows (C) 1995
  3.  
  4. Title: DRAGLIST Example
  5.  
  6. Keywords: TDragList;TDragListEventHandler
  7.  
  8.  
  9. This sample illustrates how to use the TDragList class which provides
  10. the programer with a draggable listbox. The sample creates a main window 
  11. that has five children: a static control, two draggable listboxes
  12. and two radio buttons.  The example derives a class TExampleDragList from 
  13. TDragList to implement its features.
  14.  
  15.  
  16. The static control displays information about the program as you are
  17. dragging items around.
  18.  
  19.  
  20. The draggable listboxes contain several text items. The first item
  21. cannot be dragged nor can it be dropped on. This is implemented by
  22. handling the virtual functions BeginDrag(), Dragging() and Dropped in 
  23. TExampleDragList. The items can either be moved with in the one listbox, 
  24. copied over to the other listbox or moved to the other listbox.  There 
  25. are two radio buttons that will toggle between moving and copying between 
  26. the list boxes.  The cursor will change to reflect moving or copying. 
  27. Look in the Dragging() method to see how the cursor change is done.  Look 
  28. in the Dropped() method to see how moving and copying is done.
  29.  
  30. To drag an item, click the left mouse button on the item and while
  31. holding the left mouse button, move the mouse to the destination. When
  32. you let go of the left mouse button, you drop the item. To cancel a
  33. drag, you can either click the right mouse button or press the Esc key
  34. while still holding the left mouse button.
  35.  
  36.  
  37. Although this is not implemented in this example, general UI dictates that 
  38. a regular drag moves the object. A ctrl-drag (i.e. holding the Ctrl key 
  39. while dragging the mouse) copies the object.  A shift-drag (i.e. holding 
  40. the shift key while dragging the mouse) extends selection. Note that dragging 
  41. and selecting items can be confusing to the user. Try not to mix both 
  42. metaphors.
  43.